<!--房型名称-->
<div class="control-group">
  <label class="control-label">产品名称:</label>
  <div class="controls">
    <%= f.text_field :name, class: 'input-inline', placeholder: "20个字以内" %>
  </div>
</div>

<div class="control-group">
  <label class="control-label">产品规格:</label>
  <div class="controls">
    <%= f.text_field :format, class: 'input-inline', placeholder: "20个字以内" %>
  </div>
</div>

<div class="control-group">
  <label class="control-label">产品价格:</label>
  <div class="controls">
    <%= f.text_field :price, class: 'input-inline', type: 'text' %>
    <label class="label-inline label_unit">元</label>
  </div>
</div>


<!--图片-->
<div class="group-form images">
  <label class="label-inline" style="">介绍图片:</label>
  <!--房型图片组件-->
  <div class="mssUploadFileContainer" data-image-num="<%= @product.images.count(:id)%>">
    <!--第三方插件-->
    <% @product.images.order("id asc").each_with_index do |image,i| %>
      <div class="fileinput fileinput-new" data-provides="fileinput" delete-image-id="<%= image.id%>" >

        <div class="fileinput-preview thumbnail" data-trigger="fileinput">
          <img  src="<%= image.url%>">
        </div>
        <div class="btn-submit-change">
          <span class="btn btn-file">
            <span class="fileinput-new iconfont"><i class="fa fa-file-image-o" aria-hidden="true"></i></span>
            <!-- <span class="fileinput-exists iconfont">&#xe605</span> -->
            <!--<!%= f.file_field :images, multiple: true, class: 'upload-input upload-image', value: image.file %>-->
            <input class="upload-input upload-image" type="file" name="store_product[images_attributes][<%= image.id %>][image]">
          </span>
        </div>
        <div class="btn-close iconfont"><i class="fa fa-trash-o" aria-hidden="true"></i></div>
      </div>
    <% end %>
  </div>
</div>



<!--提示-->
<section class="attention">
  <label class="color-f25e4b" style="margin-left: 12px;">图片有且至少有一张!</label>
</section>

<!--确定 取消-->
<div class="button-submit-cancle">
  <button class="btn btn-crud button-submit" type="submit" name="commit" >确 定</button>
  <%= link_to '取消', "javascript:history.back(-1)", class: 'btn positio btn-cancel' %>


</div>
